import Vue from 'vue'
import Router from 'vue-router'
import darksoul from '@/components/darksoul'
import painting from '@/components/painting'
import read from '@/components/read'
import darksoulphone from '@/components/darksoulphone'
import readphone from '@/components/readphone'
import paintingphone from '@/components/paintingphone'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/darkdsoul',
      name: 'darkdsoul',
      component: darksoul,
      redirect: '/darksoul/painting',
      children: [
        {
          path: '/darksoul/painting',
          name: 'painting',
          component: painting,
          meta: {
            keepAlive: true // 需要缓存
          }
        },
        {
          path: '/darksoul/read',
          name: 'read',
          component: read,
          meta: {
            keepAlive: false
          }
        }
      ]
    },
    {
      path: '/darksoulphone',
      name: 'darksoulphone',
      component: darksoulphone,
      redirect: '/darksoulphone/paintingphone',
      children: [
        {
          path: '/darksoulphone/paintingphone',
          name: 'paintingphone',
          component: paintingphone,
          meta: {
            keepAlive: true // 需要缓存
          }
        },
        {
          path: '/darksoulphone/readphone',
          name: 'readphone',
          component: readphone,
          meta: {
            keepAlive: false
          }
        }
      ]
    }
  ]
})
